<?php
 
session_name('hd');
session_start();
define('IN_SCRIPT',true);

/* This will make sure the security image is not cahced */
        header("expires: -1");
        header("cache-control: no-cache, no-store, must-revalidate, max-age=-1");
        header("cache-control: post-check=0, pre-check=0", false);
        header("pragma: no-store,no-cache");

if (empty($_SESSION['secnum']) || strlen($_SESSION['secnum']) != 5 || preg_match('/\D/',$_SESSION['secnum'])) {
        die('Invalid or missing security number');
}

require('secimg.inc.php');
require('hd_settings.inc.php');

$sc=new PJ_SecurityImage($hd_settings['secimg_sum']);
$sc->printImage($_SESSION['secnum']);

exit();
?>
